package cn.edu.scau.cmi.zhangjunming.client;

import java.net.URL;
import java.util.Iterator;
import java.util.Scanner;
import java.util.Set;

import cn.edu.scau.cmi.zhangjunming.composite.consisentPersion.ConsistentComponent;
import cn.edu.scau.cmi.zhangjunming.composite.consisentPersion.ConsistentComposite;
import cn.edu.scau.cmi.zhangjunming.composite.consisentPersion.ConsistentController;
import cn.edu.scau.cmi.zhangjunming.composite.consisentPersion.ConsistentLeaf;
import javafx.application.Application;
import javafx.fxml.FXMLLoader;
import javafx.scene.Parent;
import javafx.scene.Scene;
import javafx.stage.Stage;

public class ConsistentCompositeClient extends Application{
	
	public void start(Stage primaryStage) throws Exception{
		try {
			ConsistentController.setStage(primaryStage);
			Parent root = FXMLLoader.load(getFxmlUrl());
			primaryStage.setTitle("一致性组合模式");
			primaryStage.setScene(new Scene(root));
			primaryStage.show();
		}catch(Exception event) {
			event.printStackTrace();
		}
	}
	
	private URL getFxmlUrl() {
	    ConsistentController consistentController = new ConsistentController();
	    return consistentController.getClass().getResource("ConsistentComponent.fxml");
	}
	
	public static void main(String[] args) {
		launch(args);
	}

	
}
